<?php

namespace App\Http\Controllers\Api;

use App\Models\Test;
use Illuminate\Support\Facades\DB;

class TestController extends BaseController
{

    public function test(){
        $test=new Test();
        $tests=$test->all();

        foreach ($tests as $t) {
            echo $t->name;
        }
        $test1=$test->find(3);
        print_r($test1->name);
}
    public function test1(){
        db::table('test')->insert(['value'=>$_REQUEST['method']]);
        $value=db::table('config')->where('name','test2')->value('value');
        echo $value;
    }
    public function test2(){
        db::table('test')->insert('UCS:'.['value'=>$_REQUEST['method']]);
        $value=db::table('config')->where('name','test2')->value('value');
        echo $value;
    }
}
